Fix vc-mode's handling of temporary buffers.
authorRob Browning <rlb@defaultvalue.org>
Wed, 15 Oct 2008 04:29:44 +0000 (21:29 -0700)
committerRob Browning <rlb@defaultvalue.org>
Wed, 15 Oct 2008 04:29:44 +0000 (21:29 -0700)
debian/changelog
debian/patches/do-not-show-vc-internal-tmp-buffers.diff [new file with mode: 0644]
debian/patches/series

index 4bf73a71f3195d132e82afa28342b0655ef8d82c..cd59efc9113a1461eb01d442cb307fe87d65eed7 100644 (file)
@@ -9,7 +9,12 @@ emacs22 (22.2+2-4) unstable; urgency=medium
   * Invoke xmlstarlet from flymake as xmlstarlet rather than xml.  Thanks
     to Jussi Judin <jjudin+debian@iki.fi>. (closes: 447378)
 
- -- Rob Browning <rlb@defaultvalue.org>  Tue, 14 Oct 2008 21:22:59 -0700
+  * Fix vc-mode's handling of internal temporary buffers.  This should
+    avoid failures when trying to open files under monotone version
+    control.  Thanks to Sven Joachim <svenjoac@gmx.de> and Michael Berg
+    <michaeljberg@gmail.com>. (closes: #476108)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Tue, 14 Oct 2008 21:28:47 -0700
 
 emacs22 (22.2+2-3) unstable; urgency=medium
 
diff --git a/debian/patches/do-not-show-vc-internal-tmp-buffers.diff b/debian/patches/do-not-show-vc-internal-tmp-buffers.diff
new file mode 100644 (file)
index 0000000..fa2701c
--- /dev/null
@@ -0,0 +1,40 @@
+* A problem with vc mode's handling of temporary buffers has been fixed.
+  Patch: do-not-show-vc-internal-tmp-buffers.diff
+  Provided-by: Sven Joachim <svenjoac@gmx.de>
+  Originally-reported-by: Michael Berg <michaeljberg@gmail.com>
+  Date: Mon, 14 Apr 2008 14:36:05 UTC
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: incorporated upstream
+  Bug: 476108
+
+  Emacs should no longer fail when trying to open files under monotone
+  version control.
+
+  From the upstream ChangeLog:
+
+    2008-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc.el (vc-do-command): Don't show internal temp buffers.
+
+Index: sid/lisp/vc.el
+===================================================================
+--- sid.orig/lisp/vc.el
++++ sid/lisp/vc.el
+@@ -1047,9 +1047,14 @@
+         (when (and (not (eq t okstatus))
+                      (or (not (integerp status))
+                          (and okstatus (< okstatus status))))
+-          (pop-to-buffer (current-buffer))
+-          (goto-char (point-min))
+-          (shrink-window-if-larger-than-buffer)
++            ;; Don't show internal temp buffers.  Especially since, together
++            ;; with with-temp-buffer and pop-up-frames, this can result in
++            ;; bugs where with-temp-buffer ends up not preserving
++            ;; current-buffer (because kill-buffer doesn't preserve it).
++            (unless (eq ?\s (aref (buffer-name (current-buffer)) 0))
++              (pop-to-buffer (current-buffer))
++              (goto-char (point-min))
++              (shrink-window-if-larger-than-buffer))
+           (error "Running %s...FAILED (%s)" command
+                  (if (integerp status) (format "status %d" status) status))))
+       (if vc-command-messages
index f5560549cbec302ad8d429ee87abdcf1687f125d..4f7d095a0d66306b663c1af5e6d99959a402e43c 100644 (file)
@@ -14,4 +14,5 @@ look-for-news-to-find-etc.diff
 fix-woman2-th.diff
 fix-python-module-handling-cve-2008-3949.diff
 fix-flymake-xmlstarlet-invocation.diff
+do-not-show-vc-internal-tmp-buffers.diff
 autofiles.diff